#include <iostream>

using namespace std;

#include "BinarySearchTree.h"

class A
{
public:
	explicit A(int a=0)
		:_a(a)
	{ }

	operator bool()
	{
		if (_a < 10)
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	explicit operator int()
	{
		if (_a < 10)
		{
			return 1;
		}
		else
		{
			return 0;
		}
	}

	void setvalue(int a)
	{
		_a = a;
	}

	void print()
	{
		cout << _a << endl;
	}

private:
	int _a;
};

void test()
{
	A a;
	int b;
	while (a)
	{
		cin >> b;
		a.setvalue(b);
		a.print();
	}
}

int main()
{
	//TestBSTree1();
	//TestBSTree2();
	//TestBSTree3();
	//TestBSTree4();
	//TestBSTree5();
	//TestBSTree6();
	// 
	
	test();

	//key_value::TestBSTree1();
	//key_value::TestBSTree2();

	return 0;
}